package com.lg.atp.service;

import java.util.List;
import java.util.Map;

import com.alibaba.fastjson.JSONObject;
import com.lg.atp.entity.TblControls;

public interface IControlService {

	//生成编码
	public String generateNewCode();
	//保存
	public TblControls saveControl(TblControls control);
	//更新
	public List<TblControls> updateControl(TblControls control);
	//删除
	public void delControl(Long id);
	//获取最顶层的控件
	public List<TblControls> selectRootControl(Long appId);
	//获取单一控件
	public TblControls selectControlById(Long id);
	
	//获取同级目录下相同名称的控件
    public Long selectControlByName(Map<String,Object> map);
	//获取相同Code的控件
	public Long selectControlByCode(Long id);
	
	public List<TblControls> selectControlWithChildById(Long id);
	
	public List<TblControls> selectControlByParam(Map<String,Object> map);
	
	public List<TblControls> selectControlByParamWithState(Map<String,Object> map);
	
	//拖拽
	public void changeControlParent(Long id,Long parentId) throws Exception;
	
	public void setControlToRoot(Long id) throws Exception;
	
	
	public JSONObject selectControlName();
}
